﻿#region Usings

using System;
using System.Collections.Generic;
using System.Linq;

#endregion

namespace Rail.Net.Core.Interfaces.Data.Cacheable
{
    public interface ICacheProvider
    {
        IEnumerable<T> GetOrCreateCache<T>(IQueryable<T> query);
        IEnumerable<T> GetOrCreateCache<T>(IQueryable<T> query, TimeSpan cacheDuration);
        void RemoveFromCache<T>(IQueryable<T> query);
        void ClearCache<T>();
    }
}